﻿using AutoMapper;
using EasyI18n.Api.Infrastructure.DataPersistence.MongoDb.Entities;
using EasyI18n.Api.Primary.Bases;
using EasyI18n.Api.Primary.Contracts.Bases;
using Mediator.Net.Contracts;

namespace EasyI18n.Api.Primary.Contracts.ProjectContracts;

public interface ICreateProjectContract : ICommandContract<CreateProjectCommand>;

public class CreateProjectCommand : ICommand, IMapFrom<Project>
{
    public string Name { get; set; }
    

    // 将当前 的 CreateProjectCommand 转换为 Project
    public void ConfigureMapper(IMapperConfigurationExpression cfg, Project? source)
    {
        this.CreateMapperConfiguration(cfg, source).ReverseMap();
    }
}